#include<iostream>
#include<vector>
using namespace std;
struct VS{
	int h=0;
	int d=0;
};
int o(int a,int b){
	if(a>=b){
		return a-b;
	}
	return b-a;
}
int main(){
	char a;
	VS s_11,s_21,x;
	vector<VS> k_11;
	vector<VS> k_21;
	while(1){
		cin>>a;
		if((a!='E') && (a!='W') && (a!='L')){
			continue;
		}
		if(a=='E'){
			x.h=s_11.h;
			x.d=s_11.d;
			k_11.push_back(x);
			s_11.d=0;
			s_11.h=0;
			x.h=s_21.h;
			x.d=s_21.d;
//			cout<<x.h<<" "<<x.d<<endl;
			k_21.push_back(x);
			s_21.d=0;
			s_21.h=0;
			break;
		}
		if(a=='W'){
			s_11.h++;
			s_21.h++;
		}
		else{
			s_11.d++;
			s_21.d++;
		}
		if((s_11.h>=11) && ((s_11.h-s_11.d>=2))){
			x.h=s_11.h;
			x.d=s_11.d;
			k_11.push_back(x);
			s_11.d=0;
			s_11.h=0;
		}
		else if((s_11.d>=11) && ((s_11.d-s_11.h)>=2)){
			x.h=s_11.h;
			x.d=s_11.d;
			k_11.push_back(x);
			s_11.d=0;
			s_11.h=0;
		}
		if((s_21.h>=21) && ((s_21.h-s_21.d>=2))){
			x.h=s_21.h;
			x.d=s_21.d;
//			cout<<"1"<<x.h<<" "<<x.d<<endl;
			k_21.push_back(x);
			s_21.d=0;
			s_21.h=0;
		}
		else if((s_21.d>=21) && ((s_21.d-s_21.h)>=2)){
			x.h=s_21.h;
			x.d=s_21.d;
//			cout<<"2"<<x.h<<" "<<x.d<<endl;
			k_21.push_back(x);
			s_21.d=0;
			s_21.h=0;
		}
	}
	for(int i=0;i<k_11.size();i++){
		cout<<k_11[i].h<<":"<<k_11[i].d<<endl;
	}
	cout<<endl;
	for(int i=0;i<k_21.size();i++){
		cout<<k_21[i].h<<":"<<k_21[i].d<<endl;
	}
}
